package chapter06.Example1;

import java.util.ArrayList;

public class Example1 {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("张三");
        list.add("李四");
        list.add("王五");
        list.add("赵六");
        list.add(Math.PI);
        System.out.println("list.size() = " + list.size());
        System.out.println(list);
        System.out.println("list.get(1) = " + list.get(1));
        list.set(2,"小明");
        list.add(2,"王五");
        System.out.println(list);
        System.out.println("list.remove(4) = " + list.remove(4));
    }
}